package com.fary.resource;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class PrintResource {
	/**
	 * 输出输入流的内容
	 * @param is
	 * @throws IOException
	 */
	public static void printContent(InputStream is) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(is));
		String line;
		while ((line=br.readLine()) != null) {
			System.out.println(line);
		}
		if (is != null) {
			is.close();
		}
		if (br != null) {
			br.close();
		}
	}
}
